2020-2021 Sunseeker Telemetry and Lighting System
usci_b_i2c_ex4_slaveTxMultiple.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Macros

#define SLAVE_ADDRESS   0x48
 
#define TXLENGTH   0x05
 

Functions

void main ()
 
void USCI_B0_ISR (void)
 

Variables

unsigned char transmitData []
 
unsigned char * transmitDataPointer
 
unsigned char transmitLength = TXLENGTH
 

Macro Definition Documentation

◆ SLAVE_ADDRESS

#define SLAVE_ADDRESS   0x48

This example shows how to configure the I2C module as a slave for multi byte transmission. The address of the slave module is set in this example.

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • I2C peripheral
  • GPIO Port peripheral (for I2C pins)
  • SCL2
  • SDA

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • USCI_B0_VECTOR.

Definition at line 64 of file usci_b_i2c_ex4_slaveTxMultiple.c.

◆ TXLENGTH

#define TXLENGTH   0x05

Definition at line 70 of file usci_b_i2c_ex4_slaveTxMultiple.c.

Function Documentation

◆ main()

void main ( void  )

◆ USCI_B0_ISR()

void USCI_B0_ISR ( void  )

Variable Documentation

◆ transmitData

unsigned char transmitData[]
Initial value:
= { 0xAB, 0xAC, 0xAD, 0xAE, 0xAF,
0xB0, 0xB1, 0xB2, 0xB3, 0xB4}

Definition at line 72 of file usci_b_i2c_ex4_slaveTxMultiple.c.

Referenced by main().

◆ transmitDataPointer

unsigned char* transmitDataPointer

Definition at line 74 of file usci_b_i2c_ex4_slaveTxMultiple.c.

Referenced by main(), and USCI_B0_ISR().

◆ transmitLength

unsigned char transmitLength = TXLENGTH

Definition at line 75 of file usci_b_i2c_ex4_slaveTxMultiple.c.

Referenced by main(), and USCI_B0_ISR().